<%@ page import="javax.sql.*"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ page import="java.util.*"%>

<html:html>
	<head>
		
	</head>
<body>

	<!-- in case validation of the entry data fails in the data bean -->
	<html:errors />

	
			<!-- Add an HTML table header row to format the results -->
			<table>
			<tr>
				
				<th>Name</th>
				
				<th>Action</th>
			</tr>
			

			<%-- -------- Iteration Code -------- --%>
			<%
				// Get the studentsRowSet
				RowSet crsReviewers = (RowSet) request.getAttribute("crsReviewers");
				while (crsReviewers.next()) {
					%>
					
			<tr>
					<td>
						<%=crsReviewers.getString(2) %>
					</td>
	
				<html:form action="/deleteReviewer">
					<html:hidden property="id" value="<%=Integer.toString(crsReviewers.getInt(1)) %>" />
					<td><html:submit value="Delete" /></td>
				</html:form>
			</tr>
			<%
				}
			%>
			</table>
			
		<html:form method="post" action="/addReviewer" >
		Name: <html:text property="name" size="20" /> <BR>
		Password:  <html:text property="password" size="20" /> <BR>
		
		<html:submit>Submit</html:submit>
		</html:form>
		
		
		
</body>
</html:html>


